<extend name="public:main" />
<block name="body">
	<div class="wrap jj">
		<div class="nav">
			<ul class="cc">
				<li class="current"><a href="{:U('ad:index')}">所有广告</a></li>
				<li ><a href="{:U('ad:add')}" >添加广告</a></li>
			</ul>
		</div>
		<div class="common-form">
			<form method="post" class="J_ajaxForm" action="#">
				<div class="table_list">
					<table width="100%">
						<thead>
							<tr>
								<td align='center'>ID</td>
								<td align='center'>广告名称</td>
								<td>调用代码</td>
								<td align='center'>操作</td>
							</tr>
						</thead>
						<tbody>
						<foreach name="list" item="vo">
							<tr>
								<td align='center'>{$vo.ad_id}</td>
								<td align='center'>{$vo.ad_name}</td>
								<td>{ :show_ad('{$vo['ad_name']}')}</td>
								<td align='center'>
									<a href="{:U('ad/edit',array('id'=>$vo[ad_id]))}" >修改</a>|
									<a href="{:U('ad/delete',array('id'=>$vo[ad_id]))}" class="J_ajax_del" >删除</a>
								</td>
							</tr>
						</foreach>
						</tbody>
					</table>
					<div class="p10"><div class="pages">{$page} </div> </div>
				</div>
			</form>
		</div>
	</div>
</block>